home *** CD-ROM | disk | FTP | other *** search
/ Floppyshop 2 / Floppyshop - 2.zip / Floppyshop - 2.iso / diskmags / 5791-.end / dmg-6260 / articles / speech.doc < prev    next >
Text File  |  1993-07-02  |  1KB  |  34 lines

  1.                    STOS SYNTHESISED SPEECH ROUTINE
  2.                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3.  
  4. There is a routine available to STOS  which  can speak text back to you
  5. at a set  tempo  and  pitch.  The  program  comes  from  Issue  1 of ST
  6. Programmer (Riverdene PDL).
  7.  
  8. First, BLOAD "SPEAK.BIN" into a memory  bank.  Then you need to set the
  9. tempo and pitch:
  10.  
  11. loke start(bnk)+$752A,pitch  ($10=high - $40=low)
  12. poke start(bnk)+$6D02,tempo  ($10=fast - $80=slow)
  13.  
  14. Then, you write out what you want spoken:
  15.  
  16. SP$="I wish you would just shut up!"+chr$(0)
  17. areg(1)=varptr(SP$)
  18. dreg(0)=0
  19.  
  20. And call the routine:
  21.  
  22. call start(bnk)+$752E
  23.  
  24. Unfortunately, the speech routine does  not  play  on interrupt, and so
  25. the system freezes while the speech  is working. Also, moving the mouse
  26. around causes the voice to  slow  and  become  distorted, so be sure to
  27. switch it off first (either by using MOUSE OFF from the MISTY EXTENSION
  28. or by typing this in:)
  29.  
  30. trap 14,25,0,chr$($12)  :  switches mouse off
  31. trap 14,25,0,chr$(8)    :  switches mouse back on
  32.  
  33. Article: BLACK EAGLE 2/7/93
  34.